<template>
  <div :class="route.meta && route.meta.isTabbar ? '' : 'app'">
    <router-view></router-view>
    <van-tabbar route v-if="route.meta && route.meta.isTabbar">
      <van-tabbar-item replace to="/home" icon="home-o">首页</van-tabbar-item>
      <van-tabbar-item replace to="/train" icon="calendar-o">训练</van-tabbar-item>
      <van-tabbar-item replace to="/examine" icon="todo-list-o">考核</van-tabbar-item>
      <van-tabbar-item replace to="/my" icon="friends-o">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import { useRoute } from 'vue-router'

const route = useRoute()
</script>

<style lang="less" scoped>
.app {
  padding-bottom: 50px;
}
</style>
